﻿//PlazaStreamRegistry.cs
//Copyright (c) 2013 StockSharp LLC, all rights reserved.
//This code module is part of StockSharp library.
//This code is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
//See the file License.txt for the license details.
//More info on: http://stocksharp.com

namespace StockSharp.Plaza
{
	/// <summary>
	/// Реестр всех потоков данных сервера Плазы.
	/// </summary>
	public class PlazaStreamRegistry
	{
		static class PlazaStreamNames
		{
			public const string TradeFuture = "FORTS_FUTTRADE_REPL";
			public const string TradeOption = "FORTS_OPTTRADE_REPL";
			public const string OrderLog = "FORTS_ORDLOG_REPL";
			public const string OrderBookFuture = "FORTS_FUTORDERBOOK_REPL";
			public const string OrderBookOption = "FORTS_OPTORDERBOOK_REPL";
			public const string CommonFuture = "FORTS_FUTCOMMON_REPL";
			public const string CommonOption = "FORTS_OPTCOMMON_REPL";
			public const string Position = "FORTS_POS_REPL";
			public const string Portfolio = "FORTS_PART_REPL";
			public const string InfoFuture = "FORTS_FUTINFO_REPL";
			public const string InfoOption = "FORTS_OPTINFO_REPL";
			public const string MiscInfo = "FORTS_MISCINFO_REPL";
			public const string MarketMaking = "FORTS_MM_REPL";
			public const string ClearingMoney = "FORTS_CLMONEY_REPL";
			public const string ClearingResults = "FORTS_CLR_REPL";
			public const string Index = "RTS_INDEX_REPL";
			public const string IndexLog = "RTS_INDEXLOG_REPL";
			public const string VarMargin = "FORTS_VM_REPL";
			public const string Volatility = "FORTS_VOLAT_REPL";
			public const string Info = "FORTS_INFO_REPL";

			public const string Aggr50Future = "FORTS_FUTAGGR50_REPL";
			public const string Aggr20Future = "FORTS_FUTAGGR20_REPL";
			public const string Aggr5Future = "FORTS_FUTAGGR5_REPL";

			public const string Aggr50Option = "FORTS_OPTAGGR50_REPL";
			public const string Aggr20Option = "FORTS_OPTAGGR20_REPL";
			public const string Aggr5Option = "FORTS_OPTAGGR5_REPL";

			public const string McxTradeSpot = "MCXSPOT_MDTRADE_REPL";
			public const string McxTradeCurrency = "MCXCC_MDTRADE_REPL";
			public const string McxCommonSpot = "MCXSPOT_MDCOMMON_REPL";
			public const string McxCommonCurrency = "MCXCC_MDCOMMON_REPL";
			public const string McxAggrSpot = "MCXSPOT_AGGR_REPL";
			public const string McxAggrCurrency = "MCXCC_AGGR_REPL";
			public const string McxInfoSpot = "MCXSPOT_INFO_REPL";
			public const string McxInfoCurrency = "MCXCC_INFO_REPL";
		}

		internal PlazaStreamRegistry()
		{
			TradeFuture = new PlazaStream(PlazaStreamNames.TradeFuture);
			TradeOption = new PlazaStream(PlazaStreamNames.TradeOption);
			OrdersLog = new PlazaStream(PlazaStreamNames.OrderLog);
			OrderBookFuture = new PlazaStream(PlazaStreamNames.OrderBookFuture);
			OrderBookOption = new PlazaStream(PlazaStreamNames.OrderBookOption);
			CommonFuture = new PlazaStream(PlazaStreamNames.CommonFuture);
			CommonOption = new PlazaStream(PlazaStreamNames.CommonOption);
			Aggregation20Future = new PlazaStream(PlazaStreamNames.Aggr20Future);
			Aggregation20Option = new PlazaStream(PlazaStreamNames.Aggr20Option);
			Aggregation50Future = new PlazaStream(PlazaStreamNames.Aggr50Future);
			Aggregation50Option = new PlazaStream(PlazaStreamNames.Aggr50Option);
			Aggregation5Future = new PlazaStream(PlazaStreamNames.Aggr5Future);
			Aggregation5Option = new PlazaStream(PlazaStreamNames.Aggr5Option);
			Portfolios = new PlazaStream(PlazaStreamNames.Portfolio);
			Positions = new PlazaStream(PlazaStreamNames.Position);
			InfoFuture = new PlazaStream(PlazaStreamNames.InfoFuture);
			InfoOption = new PlazaStream(PlazaStreamNames.InfoOption);
			MiscInfo = new PlazaStream(PlazaStreamNames.MiscInfo);
			MarketMaking = new PlazaStream(PlazaStreamNames.MarketMaking);
			Clearing = new PlazaStream(PlazaStreamNames.ClearingResults);
			ClearingMoney = new PlazaStream(PlazaStreamNames.ClearingMoney);
			Index = new PlazaStream(PlazaStreamNames.Index);
			IndexLog = new PlazaStream(PlazaStreamNames.IndexLog);
			Volatility = new PlazaStream(PlazaStreamNames.Volatility);
			VarMargin = new PlazaStream(PlazaStreamNames.VarMargin);
			Info = new PlazaStream(PlazaStreamNames.Info);

			McxTradesSpot = new PlazaStream(PlazaStreamNames.McxTradeSpot);
			McxTradesCurrency = new PlazaStream(PlazaStreamNames.McxTradeCurrency);
			McxCommonSpot = new PlazaStream(PlazaStreamNames.McxCommonSpot);
			McxCommonCurrency = new PlazaStream(PlazaStreamNames.McxCommonCurrency);
			McxAggrSpot = new PlazaStream(PlazaStreamNames.McxAggrSpot);
			McxAggrCurrency = new PlazaStream(PlazaStreamNames.McxAggrCurrency);
			McxInfoSpot = new PlazaStream(PlazaStreamNames.McxInfoSpot);
			McxInfoCurrency = new PlazaStream(PlazaStreamNames.McxInfoCurrency);


			AllStreams = new[]
			{
				TradeFuture, TradeOption,
				OrdersLog,
				OrderBookFuture, OrderBookOption,
				CommonFuture, CommonOption,
				Aggregation20Future, Aggregation20Option,
				Aggregation50Future, Aggregation50Option,
				Aggregation5Future, Aggregation5Option,
				Portfolios, Positions,
				InfoFuture, InfoOption,
				MiscInfo, MarketMaking,
				ClearingMoney, Clearing,
				Index, IndexLog,
				Volatility, VarMargin, Info,
				McxTradesSpot, McxTradesCurrency, McxCommonSpot, McxCommonCurrency,
				McxAggrSpot, McxAggrCurrency, McxInfoSpot, McxInfoCurrency
			};
		}

		/// <summary>
		/// Все потоки.
		/// </summary>
		public readonly PlazaStream[] AllStreams;

		/// <summary>
		/// Фьючерсы: заявки и сделки.
		/// </summary>
		public readonly PlazaStream TradeFuture;

		/// <summary>
		/// Опционы: заявки и сделки.
		/// </summary>
		public readonly PlazaStream TradeOption;

		/// <summary>
		/// Анонимный order_log.
		/// </summary>
		public readonly PlazaStream OrdersLog;

		/// <summary>
		/// Фьючерсы: срез стакана.
		/// </summary>
		public readonly PlazaStream OrderBookFuture;

		/// <summary>
		/// Опционы: срез стакана.
		/// </summary>
		public readonly PlazaStream OrderBookOption;

		/// <summary>
		/// Фьючерсы: общая информация по сессии.
		/// </summary>
		public readonly PlazaStream CommonFuture;

		/// <summary>
		/// Опционы: общая информация по сессии.
		/// </summary>
		public readonly PlazaStream CommonOption;

		/// <summary>
		/// Фьючерсы: стакан глубиной 20 котировок.
		/// </summary>
		public readonly PlazaStream Aggregation20Future;

		/// <summary>
		/// Опционы: стакан глубиной 20 котировок.
		/// </summary>
		public readonly PlazaStream Aggregation20Option;

		/// <summary>
		/// Фьючерсы: стакан глубиной 50 котировок.
		/// </summary>
		public readonly PlazaStream Aggregation50Future;

		/// <summary>
		/// Опционы: стакан глубиной 50 котировок.
		/// </summary>
		public readonly PlazaStream Aggregation50Option;

		/// <summary>
		/// Фьючерсы: стакан глубиной 5 котировок.
		/// </summary>
		public readonly PlazaStream Aggregation5Future;

		/// <summary>
		/// Опционы: стакан глубиной 5 котировок.
		/// </summary>
		public readonly PlazaStream Aggregation5Option;

		/// <summary>
		/// Позиции.
		/// </summary>
		public readonly PlazaStream Positions;

		/// <summary>
		/// Средства и лимиты.
		/// </summary>
		public readonly PlazaStream Portfolios;

		/// <summary>
		/// Фьючерсы: справочная и сессионная информация.
		/// </summary>
		public readonly PlazaStream InfoFuture;

		/// <summary>
		/// Опционы: справочная и сессионная информация.
		/// </summary>
		public readonly PlazaStream InfoOption;

		/// <summary>
		/// Дополнительная справочная информация.
		/// </summary>
		public readonly PlazaStream MiscInfo;

		/// <summary>
		/// Обязательства ММ.
		/// </summary>
		public readonly PlazaStream MarketMaking;

		/// <summary>
		/// Клиентские деньги в клиринге.
		/// </summary>
		public readonly PlazaStream ClearingMoney;

		/// <summary>
		/// Клиринговая информация.
		/// </summary>
		public readonly PlazaStream Clearing;

		/// <summary>
		/// Индексы.
		/// </summary>
		public readonly PlazaStream Index;

		/// <summary>
		/// История значений индексо.
		/// </summary>
		public readonly PlazaStream IndexLog;

		/// <summary>
		/// Вариационная маржа.
		/// </summary>
		public readonly PlazaStream VarMargin;

		/// <summary>
		/// Волатильность.
		/// </summary>
		public readonly PlazaStream Volatility;

		/// <summary>
		/// Дополнительная справочная информация.
		/// </summary>
		public readonly PlazaStream Info;

		/// <summary>
		/// Фондовый рынок: все сделки.
		/// </summary>
		public readonly PlazaStream McxTradesSpot;

		/// <summary>
		/// Валютный рынок: все сделки.
		/// </summary>
		public readonly PlazaStream McxTradesCurrency;

		/// <summary>
		/// Фондовый рынок: общая информация по инструментам.
		/// </summary>
		public readonly PlazaStream McxCommonSpot;

		/// <summary>
		/// Валютный рынок: общая информация по инструментам.
		/// </summary>
		public readonly PlazaStream McxCommonCurrency;

		/// <summary>
		/// Фондовый рынок: котировки по инструментам.
		/// </summary>
		public readonly PlazaStream McxAggrSpot;

		/// <summary>
		/// Валютный рынок: котировки по инструментам.
		/// </summary>
		public readonly PlazaStream McxAggrCurrency;

		/// <summary>
		/// Фондовый рынок: справочная информация.
		/// </summary>
		public readonly PlazaStream McxInfoSpot;

		/// <summary>
		/// Валютный рынок: справочная информация.
		/// </summary>
		public readonly PlazaStream McxInfoCurrency;
	}
}